package com.center.biz.impl;

import com.center.api.model.EduCourseSubject;
import com.center.api.remote.RemoteEduCourseSubjectService;
import com.center.biz.dao.EduCourseSubjectMapper;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service(version = "1.0",interfaceClass = RemoteEduCourseSubjectService.class)
public class RemoteEduCourseSubjectServiceImpl implements RemoteEduCourseSubjectService {

    @Autowired
    private EduCourseSubjectMapper eduCourseSubjectMapper;

    @Override
    public int delete(int id) {
        return eduCourseSubjectMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int saveArticle(EduCourseSubject eduCourseSubject) {
        return eduCourseSubjectMapper.insertSelective(eduCourseSubject);
    }

    @Override
    public EduCourseSubject getById(int id) {
        return eduCourseSubjectMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<EduCourseSubject> list(EduCourseSubject eduCourseSubject) {
        return null;
    }

    @Override
    public int update(EduCourseSubject eduCourseSubject) {
        return eduCourseSubjectMapper.updateByPrimaryKeySelective(eduCourseSubject);
    }
}
